//
//  WebView.swift
//  Dada Solusi
//
//  Created by liyahao on 2025/9/9.
//

import SwiftUI
import WebKit

struct WebView: UIViewRepresentable {
   
    var urlStr: String

    func makeUIView(context: UIViewRepresentableContext<WebView>) -> WKWebView {
        let webview = WKWebView(frame: .zero)
        // webview.backgroundColor = Colors.vcBkg.uicolor
        return webview
    }
    
    func updateUIView(_ uiView: WKWebView, context: UIViewRepresentableContext<WebView>) {
        if let url = URL(string: urlStr) {
            uiView.load(URLRequest(url: url))
        }
    }
}
